<template>
  <a-drawer
    :title="title"
    :width="width"
    placement="right"
    :closable="false"
    @close="close"
    destroyOnClose
    :visible="visible">

    <div>
      <a-timeline>
        <a-timeline-item v-for='(i,index) in customerList '>
          <div class='buju'>
            {{(i.content)}}
          </div>
        </a-timeline-item>
      </a-timeline>
    </div>


    <div class="drawer-footer">
      <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>

    </div>
  </a-drawer>
</template>

<script>

import {getAction} from '@api/manage'

export default {
  name: 'CtrStateModal',
  components: {

  },
  data() {
    return {
      title:"客户动态",
      width:400,
      visible: false,
      disableSubmit: false,
      customerList:[]
    }
  },
  methods: {
    add () { },

    edit (id) {
      this.visible=true
      getAction('trends/customerTrends/queryByCustomerIdList',{id:id.toString()}).then(res=>{
        console.log(res)
        this.customerList = res.result
      })
    },

    close () {
      this.$emit('close');
      this.visible = false;
    },
    submitCallback(){
      this.$emit('ok');
      this.visible = false;
    },
    handleOk () {
    },
    handleCancel () {
      this.close()
    }
  }
}
</script>

<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
  margin-left: 30px;
  margin-bottom: 30px;
  float: right;
}
.drawer-footer{
  position: absolute;
  bottom: -8px;
  width: 100%;
  border-top: 1px solid #e8e8e8;
  padding: 10px 16px;
  text-align: right;
  left: 0;
  background: #fff;
  border-radius: 0 0 2px 2px;
}
.buju{
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}
</style>